FROM node:lts-alpine
# FROM nikolaik/python-nodejs:latest
# FROM node:12.18.2-alpine3.9
WORKDIR /app
COPY package.json .
# ENV npm_config_sharp_binary_host https://npm.taobao.org/mirrors/sharp/
# ENV npm_config_sharp_libvips_binary_host https://npm.taobao.org/mirrors/sharp-libvips/
RUN npm config set sharp_binary_host "https://npm.taobao.org/mirrors/sharp/" && \
    npm config set sharp_libvips_binary_host "https://npm.taobao.org/mirrors/sharp-libvips/" && \
    npm install --registry=https://registry.npm.taobao.org
# RUN npm install --registry=https://registry.npm.taobao.org
COPY . .
EXPOSE 3000
CMD ["node", "index.js"]